const { ccclass, property } = cc._decorator;
export class Util{
    public static ConvertToNodePos(node: cc.Node, toNode: cc.Node): cc.Vec2 {
        return toNode.convertToNodeSpaceAR(node.convertToWorldSpaceAR(cc.v2(0, 0)));
    }
    public static TipAnimation(parent:cc.Node,content:string){
        let tip = new cc.Label()
        tip.node.setPosition(368, 206)
        let move = cc.moveTo(0.5, cc.v2(368, 300))
        let destroy = cc.callFunc(function () {
            tip.node.removeFromParent(true)
        })
        let showTip = cc.sequence([move, destroy])
        tip.node.runAction(showTip)
        parent.addChild(tip.node)
    }
}

